﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EduProject;
using System.Linq.Expressions;

namespace Bshop.DAL
{
    public class GetScalar
    {
        BShopEntities shopEntity = new BShopEntities();
        //public  string gongxiao = "";
        //public void GetTypeGX(int TypeId)
        //{
        //   //string gongxiao = (from c in shopEntity.Type
        //   //             where c.Id == TypeId
        //   //             select gongxiao
        //   //                 );

        //}

            //public T GetScalar<T>(Expression<Func<TEntBity, bool>> predicate, Expression<Func<TEntity, T>> scalar)
            //{
            //    if (predicate == null)
            //    {
            //        return shopEntity.Set<TEntity>().AsNoTracking().Select(scalar).FirstOrDefault();
            //    }
            //    else
            //    {
            //        return shopEntity.Set<TEntity>().AsNoTracking().Where(predicate).Select(scalar).FirstOrDefault();
            //    }

            //}
    }
}
